<?php
  $this->toolkit = lmbToolkit::instance();
  var_dump($this->toolkit->getUser()->getName()); 
?>
<!-- Powered by LIMB | http://www.limb-project.com/ -->
<!-- Designed by BIT | http://www.bit-creative.com/ -->
<html>
<head>
  <base href="<?= LIMB_HTTP_BASE_PATH ?>" />
  <title>{$#title} :: Limb3 shop example application on &#123;&#123;macro&#125;&#125;</title>
  <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
  <link rel=stylesheet type="text/css" href="styles/main.css"/>
</head>
<body>

<div id="header">
  <div class="center">
    <img src="images/logo.limb.gif"  width='384' height='46' alt='logo.limb' id='logo'/>
    <div id="limb_links"><a href="http://limb-project.com">limb-project.com</a>&nbsp;|&nbsp;<a href="http://bits.limb-project.com">bits.limb-project.com</a></div>
  </div>
</div>

 <div id="center">

  <div id="wrapper" >

    <div id="container">
      <div id="content">
        <h1>{$#title}</h1>

        {{include file='flash_box.phtml'/}}

        {{slot id='content'/}}
        
      </div>
    </div>
    
    <div id="sidebar">
      <div id="navigation">
        <ul>
          <li><a href="product">Products</a></li>
          <li><a href="cart">Your Cart</a></li>
          <? if($this->toolkit->getUser()->is_logged_in) { ?>
            <li><a href="/profile/orders/">Your Orders</a></li>
          <? } ?>
        </ul>
      </div>

      <dl id="profile">
        <dt>Profile</dt>
        <? if($this->toolkit->getUser()->is_logged_in) { ?>
        <dd>
          User: {$#toolkit.user.name}<br/>
          Login: {$#toolkit.user.login}<br/>
          Email: {$#toolkit.user.email}<br/>
          <a href="/profile/">edit</a>
          <a href="/login/logout/">logout</a>
        </dd>
        <? } else {?>
        <dd>
          <form method="POST" id='login_form' action='login'>

            <label for='login'>Login:</label><br/>
            <input type="text" name="login" id="login" title="Login" class='input'/><br/>

            <label for='passwd'>Password:</label><br/>
            <input type="text" name="password" id="password" type="password" title="Password" class='input'/><br/>
            
            <p>Use <b>admin</b>/<b>secret</b> to enter in <a href="/admin/">administration panel</a>.</p>

            <input type='submit' name='submitted' value="Submit"/><br/>
          </form>
          <a href="{{route_url params='controller:profile,action:register'}}">Register</a>
        </dd>
        <? } ?>
      </dl>

    </div>

  </div>
</div>

</body>
</html>

